package com.diary.it.multi.datasource.instance2.service;

import com.diary.it.multi.datasource.instance2.mapper.UserMapper;
import com.diary.it.multi.datasource.instance2.mapper.UserMapper2;
import com.diary.it.multi.datasource.instance2.model.User;
import com.diary.it.multi.datasource.instance2.model.User2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author it
 * @Description TODO
 * @Date 2021/9/14 10:40
 * @Version 1.0
 */
@Repository
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Autowired
    private UserMapper2 userMapper2;

    @Override
    public List<User> userList1() {
        return userMapper.list();
    }

    @Override
    public List<User2> userList2() {
        return userMapper2.list();
    }
}
